package com.serkol.ams.bean;

import com.serkol.ams.entity.Users;
import lombok.Data;

@Data
public class PayMentReslt {
    private boolean success;
    private Users users;
    public  static PayMentReslt success(Users users){
        System.out.println("success");
        PayMentReslt payMentReslt=new PayMentReslt();
        payMentReslt.setSuccess(true);
        payMentReslt.setUsers(users);
        return payMentReslt;
    }
    public  static PayMentReslt fail(Users users){
        System.out.println("fail");
        PayMentReslt payMentReslt=new PayMentReslt();
        payMentReslt.setSuccess(false);
        payMentReslt.setUsers(users);
        return payMentReslt;
    }
    public  static PayMentReslt valid(Users users,boolean flag,int code){
        System.out.println("valid:"+code);
        System.out.println(users);

        return valid(users,flag);
    }
    public  static PayMentReslt valid(Users users,boolean flag){

        PayMentReslt payMentReslt=new PayMentReslt();
        payMentReslt.setSuccess(flag);
        payMentReslt.setUsers(users);
        return payMentReslt;
    }

}
